package com.guanyong.dao;

import com.guanyong.model.VideoScoreModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by mxk on 2017/6/2.
 */
public interface IVideoScoreDaoMapper {
    @Select("SELECT * FROM t_ad_videoscore  where f_id=#{fId}")
    @ResultMap("VideoScoreResultMap")
    VideoScoreModel selectByPrimaryKey(String fId);

    @Select("SELECT * FROM t_ad_videoscore  where f_classtype=#{classtype} and f_objectid=#{objectid}")
    @ResultMap("VideoScoreResultMap")
    VideoScoreModel selectVideoScore(@Param("objectid") String objectid,
                               @Param("classtype") Integer classtype);

    @Select("SELECT * FROM t_ad_videoscore  where f_id in (${idlist})")
    @ResultMap("VideoScoreResultMap")
    List<VideoScoreModel> selectIdList(@Param("idlist") String idlist);

    int insert(@Param(value = "record") VideoScoreModel record);

    int update(@Param(value = "record") VideoScoreModel record);


}
